<?php

if (!defined('PATH'))
	exit();

//*note* you can use every var from view and global as SQL, archez, ots and config

$characterPageQuests = array();
$characterPageQuests[] = array('storage' => 5000, 'value' => 1, 'name' => 'Demon Helmet Quest');

if (count($characterPageQuests) != 0) {
	echo "<br/><table border='0' cellpadding='8' cellspacing='1' width='100%'>";
	echo "<tr class='head'><td colspan='2'><b>Quests</b></td></tr>";
	echo "<tr class='bold'><td width='90%'>Name</td><td>Status</td></tr>";
	foreach ($characterPageQuests as $value) {
		$quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = " . $player->getId() . " AND `key` = '" . $value['storage'] . "' AND `value` = '" . $value['value'] . "'")->fetch();
		$status = ($quest) ? "done" : "notdone";
		echo "<tr><td width='90%'>" . $value['name'] . "</td><td><center><img src='".PATH."/system/injections/".$INJECTION_PATH."/".$status.".png'/></center></td></tr>";
	}
	echo "</table>";
}
?>